﻿<%@ Page Language="C#" AutoEventWireup="true" Buffer="false" CodeBehind="DesktopMain.aspx.cs"
    Inherits="ZX.WebApp.DeskTop.Form.DesktopMain" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="/ExtendPage/Template/matrix-1/css/bootstrap.min.css" rel="stylesheet"
        type="text/css" />
    <link rel="stylesheet" href="/ExtendPage/Template/matrix-1/css/bootstrap-responsive.min.css" />
    <link rel="stylesheet" href="/ExtendPage/Template/matrix-1/css/matrix-style.css" />
    <link rel="stylesheet" href="/ExtendPage/Template/matrix-1/css/matrix-media.css" />
    <link href="/ExtendPage/Template/matrix-1/font-awesome/css/font-awesome.css" rel="stylesheet" />
   <link href="/ExtendPage/Style/mainpage.css" rel="stylesheet" type="text/css" />
    <style type="text/css"> 
        .tab-pane
        {
            padding: 2px;
        }
        .tableContent
        {
            margin: 0px;
            padding: 0px;
            width: 100%;
            font-size: 12px;
        }
        .tableContent th
        {
            font: bold 10px "Trebuchet MS" , Verdana, Arial, Helvetica, sans-serif;
            color: Black; /*color: #4f6b72;*/ /*border-left: 1px solid #C1DAD7;*/
            border-right: 1px solid #C1DAD7;
            border-bottom: 1px solid #C1DAD7;
            border-top: 1px solid #C1DAD7;
            letter-spacing: 2px;
            text-transform: uppercase;
            text-align: left;
            padding: 6px 6px 6px 1px; /*background: #CAE8EA no-repeat;*/
            background: #e0ecff no-repeat;
        }
        .tableContent td
        {
            border-right: 1px solid #C1DAD7;
            border-bottom: 1px solid #C1DAD7;
            background: #fff;
            font-size: 11px;
            padding: 6px 6px 6px 1px; /*color: #4f6b72;*/
            color: Black;
        }
        
        a:visited
        {
            color: Blue;
            text-decoration: none;
        }
        a:hover
        {
            color: Blue;
            text-decoration: none;
        }
        a:link
        {
            color: Blue;
            text-decoration: none;
        }
        a:active
        {
            color: Blue;
            text-decoration: none;
        }
        .menu_item_2
        {
           text-align:left;
        }
        .row-fluid
        {
            margin:10px;
            padding:5px;
        }
        
        
    </style>
</head>
<body style="background-color: #fff">
    <form id="form1" runat="server">
    <div class="row-fluid">
        <div class="span5" style="margin-left: 5px;" id="custom_clum_left">
            <ul id="custom_clum_left_li"></ul>
        </div>
        <div class="span7" style="margin-left: 10px;" id="custom_clum_right">
        <ul id="custom_clum_right_li"></ul>
        </div>
    </div>
    <!--主体 开始-->
    <!--主体 结束-->
    </form>
</body>
</html>
<script src="/Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="/ExtendPage/Template/matrix-1/js/jquery.ui.custom.js" type="text/javascript"></script>
<script src="/ExtendPage/Template/matrix-1/js/bootstrap.min.js" type="text/javascript"></script>
<script src="/ExtendPage/Template/matrix-1/js/matrix.interface.js" type="text/javascript"></script>
<script src="/Scripts/jquery.data.js" type="text/javascript"></script>
<script src="/Scripts/jquery.action.js" type="text/javascript"></script>
<script type="text/javascript">
    var arrayObj = new Array();　
    var fnInitList = function (data) {
        $.each(data, function (i) {
            var flag = 0;
            $.each(arrayObj, function (n) {
                if (arrayObj[n] == data[i].Caption) {
                    flag = 1;
                }
            });
            if (flag == 0) {
                arrayObj.push(data[i].Caption);
            }
        });

        var template1 = "";
        var template2 = "";
        $.each(arrayObj, function (i) {
            var _template = '<LI class="menu_item_1"><h4><A href="javascript:;"><I class="icon-personal"></I></A><A class="app-name deep0" >' + arrayObj[i] + '</A></h4>[@Template@]</LI>';
            var _template1 = "";
            $.each(data, function (n) {
                //debugger
                if (arrayObj[i] == data[n].Caption) {
                    _template1 = _template1 + '<LI class="menu_item_2"  caption="' + data[n].FlowCaption + '" url="/crm/BasePages/StartWorkflow.aspx?title=' + data[n].TaskCaption + '&WorkflowId=' + data[n].WorkFlowId + '&WorktaskId=' + data[n].WorkTaskid + '"><A class="app-name deep1" >' + data[n].FlowCaption + '</A></LI>';
                }
            });
            _template = _template.replace("[@Template@]", _template1);
            if (i % 2 == 0) {
                $("#custom_clum_left_li").append(_template);
            } else {
                $("#custom_clum_right_li").append(_template);
            }
        });
        $(".row-fluid ul li").click(function () {
            parent.addTabs($(this).attr("caption"), $(this).attr("url"));


        })
    }
    fnRunProc2("HF_GetAllowsStartWorkFlowsPro",parent._currentUser.LoginName,fnInitList);
//    var _template = "";
//    if (deep == 0) {
//        _template = '<LI class="menu_item_1" url="[@data.URL@]" id="[@id@]" title="[@data.Name@]"><h4><A href="javascript:;"><I class="icon-personal"></I></A><A class="app-name deep0" >[@app-name@]</A></h4>[@Template@]</LI>';
//    } else {
//        _template = '<LI class="menu_item_2" url="[@data.URL@]" id="[@id@]" title="[@data.Name@]"><A href="javascript:;"><I class="icon-personal"><img src="/images/system/prg.png"/></I></A><A class="app-name deep' + deep + '" >[@app-name@]</A>[@Template@]</LI>';
//    }
</script>


